package ui.panels.primary.playerProperties;

import gameEngine.agents.choosingStrategy.representation.StrategyRepresentation;
import gameEngine.agents.distrebution.representation.DistributionRepresentation;

import java.awt.Color;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import java.util.ArrayList;

import javax.swing.GroupLayout;
import javax.swing.JButton;
import javax.swing.JCheckBox;
import javax.swing.JComboBox;
import javax.swing.JComponent;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextField;
import javax.swing.LayoutStyle;

import org.apache.log4j.Logger;

import ui.flowManager.expirimentProperties.AdditionalSettings;
import ui.flowManager.expirimentProperties.AgentRepresentation;
import ui.flowManager.expirimentProperties.ExperimentProperties;
import ui.flowManager.expirimentProperties.ExperimentProperties.Agent_Group;
import ui.panels.additionalSettings.AdditionalSettingsFrame;
import ui.panels.additionalSettings.AdditionalSettingsPanel;
import ui.panels.commands.DistributionFrameCommand;
import ui.panels.commands.SavePlayerCommand;
import ui.panels.commands.StrategyFrameCommand;
import ui.panels.errors.ErrorFrame;
import ui.panels.errors.ErrorPanel;

import Data.ConfigurationParameters;

import auxiliary.AuxiliaryClass;

import com.cloudgarden.layout.*;



/**
 * @author vladimir && alon
 *
 * GUI of the player's properties
 */
public  class PlayerPropertiesPanel_2 extends JPanel{
	private static 		ArrayList<String> distributionList = null;
	private static 		ArrayList<String> strategyList = null;
	private static 		ArrayList<String> teammateModelList = null;
	private static 		ArrayList<String> analyzerlList = null;
	
	private JLabel 		DistributionLabel;
	private JLabel 		StrategyLabel;
	private JLabel 		TeammateModelLabel;
	private JLabel 		AnalyzerLabel;
	private JLabel 		EpsilonLabel;
	private JLabel 		jLabel6;
	private JLabel 		PlayerLabel;

	private JButton 	additionalSettingsbutton;
	private JButton 	SaveButton;

	private JCheckBox 	jCheckBox1;
	
	private JTextField 	nextPlayersField;
	private JTextField 	competenceField;
	private JTextField 	epsilonField;
	
	private JComboBox 	AnalyzerComboBox;
	private JComboBox 	StrategyComboBox;
	private JComboBox 	TeammateModelComboBox;
	private JComboBox 	DistributionComboBox;

	private int 		playerNumber  = 0; 
	private int 		gameNumber	  = 0; 
	
	private DistributionRepresentation 	distRepresentation = null;
	private StrategyRepresentation 		strategyRepresentation = null;
	private AdditionalSettings 			additionalSettings = null;
	private final Agent_Group			group = Agent_Group.CONTROL_AGENT;
	Logger log = Logger.getLogger(this.getClass());
	
	/*** Set a special look for the window*/
	{
		//Set Look & Feel
		try {
			javax.swing.UIManager.setLookAndFeel("javax.swing.plaf.nimbus.NimbusLookAndFeel");
		} catch(Exception e) {
			e.printStackTrace();
		}
	}
	
	/**
	 * Default CTOR
	 */
	public	PlayerPropertiesPanel_2(){}
	
	/** 
	 * @param playerNumber
	 */
	public	PlayerPropertiesPanel_2(int gamenumber , int	playerNumber)
	{
		this.gameNumber		=	gamenumber;
		this.playerNumber 	=	playerNumber;
	}
	
	

	public void show(ExperimentProperties props) {
		// TODO Auto-generated method stub
		try {
			GroupLayout thisLayout = new GroupLayout((JComponent)this);
			this.setLayout(thisLayout);
			setPreferredSize(new Dimension(339, 480));
			{
				DistributionLabel = new JLabel();
				DistributionLabel.setText("Distribution");
			}
			{
				StrategyLabel = new JLabel();
				StrategyLabel.setText("Strategy");
			}
			{
				TeammateModelLabel = new JLabel();
				TeammateModelLabel.setText("TeammateModel");
			}
			{
				AnalyzerLabel = new JLabel();
				AnalyzerLabel.setText("Analyzer");
			}
			
			//combo box creation
			{
				StrategyComboBox = new JComboBox();
				TeammateModelComboBox = new JComboBox();
				AnalyzerComboBox = new JComboBox();
				DistributionComboBox = new JComboBox();
			}
			
			{
				epsilonField = new JTextField();
			}
			{
				EpsilonLabel = new JLabel();
				EpsilonLabel.setText("Epsilon Value");
			}
			{
				jLabel6 = new JLabel();
				jLabel6.setText("Competence");
			}
			{
				SaveButton = new JButton();
				SaveButton.setText("Save Player");
			}
			{
				additionalSettingsbutton = new JButton("Additional Settings");	

				jCheckBox1 = new JCheckBox("For next players", false);
			}
			{
				nextPlayersField = new JTextField();
				nextPlayersField.setEnabled(false);
			}
			{
				PlayerLabel = new JLabel("", JLabel.CENTER);
				PlayerLabel.setFont(new Font(Font.SERIF, Font.ROMAN_BASELINE, 20));
			}
			{
				competenceField = new JTextField();
			}
			thisLayout.setVerticalGroup(thisLayout.createSequentialGroup()
				.addContainerGap(10, 10)
				.addComponent(PlayerLabel, GroupLayout.PREFERRED_SIZE, 37, GroupLayout.PREFERRED_SIZE)
				.addGap(19)
				.addGroup(thisLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
				    .addComponent(TeammateModelLabel, GroupLayout.Alignment.BASELINE, GroupLayout.PREFERRED_SIZE, 19, GroupLayout.PREFERRED_SIZE)
				    .addComponent(DistributionLabel, GroupLayout.Alignment.BASELINE, GroupLayout.PREFERRED_SIZE, 19, GroupLayout.PREFERRED_SIZE))
				.addGroup(thisLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
				    .addComponent(TeammateModelComboBox, GroupLayout.Alignment.BASELINE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE)
				    .addComponent(DistributionComboBox, GroupLayout.Alignment.BASELINE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE))
				.addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)
				.addGroup(thisLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
				    .addComponent(AnalyzerLabel, GroupLayout.Alignment.BASELINE, GroupLayout.PREFERRED_SIZE, 19, GroupLayout.PREFERRED_SIZE)
				    .addComponent(StrategyLabel, GroupLayout.Alignment.BASELINE, GroupLayout.PREFERRED_SIZE, 19, GroupLayout.PREFERRED_SIZE))
				.addGroup(thisLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
				    .addComponent(AnalyzerComboBox, GroupLayout.Alignment.BASELINE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE)
				    .addComponent(StrategyComboBox, GroupLayout.Alignment.BASELINE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE))
				.addGap(17)
				.addGroup(thisLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
				    .addComponent(EpsilonLabel, GroupLayout.Alignment.BASELINE, GroupLayout.PREFERRED_SIZE, 23, GroupLayout.PREFERRED_SIZE)
				    .addComponent(jLabel6, GroupLayout.Alignment.BASELINE, GroupLayout.PREFERRED_SIZE, 23, GroupLayout.PREFERRED_SIZE))
				.addGroup(thisLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
				    .addComponent(competenceField, GroupLayout.Alignment.BASELINE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE)
				    .addComponent(epsilonField, GroupLayout.Alignment.BASELINE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE))
				.addGap(32)
				.addGroup(thisLayout.createParallelGroup(GroupLayout.Alignment.BASELINE)
				    .addComponent(nextPlayersField, GroupLayout.Alignment.BASELINE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE)
				    .addComponent(jCheckBox1, GroupLayout.Alignment.BASELINE, GroupLayout.PREFERRED_SIZE, 27, GroupLayout.PREFERRED_SIZE))
				.addGap(36)
				.addComponent(additionalSettingsbutton, GroupLayout.PREFERRED_SIZE, 33, GroupLayout.PREFERRED_SIZE)
				.addGap(0, 19, Short.MAX_VALUE)
				.addComponent(SaveButton, GroupLayout.PREFERRED_SIZE, 52, GroupLayout.PREFERRED_SIZE)
				.addContainerGap(40, 40));
			thisLayout.setHorizontalGroup(thisLayout.createSequentialGroup()
				.addContainerGap(28, 28)
				.addGroup(thisLayout.createParallelGroup()
				    .addGroup(thisLayout.createSequentialGroup()
				        .addGroup(thisLayout.createParallelGroup()
				            .addComponent(StrategyComboBox, GroupLayout.Alignment.LEADING, GroupLayout.PREFERRED_SIZE, 124, GroupLayout.PREFERRED_SIZE)
				            .addComponent(DistributionComboBox, GroupLayout.Alignment.LEADING, GroupLayout.PREFERRED_SIZE, 124, GroupLayout.PREFERRED_SIZE))
				        .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED, 12, Short.MAX_VALUE)
				        .addGroup(thisLayout.createParallelGroup()
				            .addComponent(AnalyzerComboBox, GroupLayout.Alignment.LEADING, GroupLayout.PREFERRED_SIZE, 124, GroupLayout.PREFERRED_SIZE)
				            .addGroup(GroupLayout.Alignment.LEADING, thisLayout.createSequentialGroup()
				                .addComponent(AnalyzerLabel, GroupLayout.PREFERRED_SIZE, 93, GroupLayout.PREFERRED_SIZE)
				                .addGap(31))
				            .addComponent(TeammateModelComboBox, GroupLayout.Alignment.LEADING, GroupLayout.PREFERRED_SIZE, 124, GroupLayout.PREFERRED_SIZE)
				            .addGroup(GroupLayout.Alignment.LEADING, thisLayout.createSequentialGroup()
				                .addComponent(TeammateModelLabel, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE)
				                .addGap(31))))
				    .addGroup(thisLayout.createSequentialGroup()
				        .addGap(11)
				        .addGroup(thisLayout.createParallelGroup()
				            .addGroup(thisLayout.createSequentialGroup()
				                .addComponent(SaveButton, GroupLayout.PREFERRED_SIZE, 248, GroupLayout.PREFERRED_SIZE)
				                .addGap(0, 0, Short.MAX_VALUE))
				            .addGroup(thisLayout.createSequentialGroup()
				                .addComponent(additionalSettingsbutton, GroupLayout.PREFERRED_SIZE, 248, GroupLayout.PREFERRED_SIZE)
				                .addGap(0, 0, Short.MAX_VALUE))
				            .addGroup(thisLayout.createSequentialGroup()
				                .addPreferredGap(SaveButton, jCheckBox1, LayoutStyle.ComponentPlacement.INDENT)
				                .addGroup(thisLayout.createParallelGroup()
				                    .addGroup(thisLayout.createSequentialGroup()
				                        .addGroup(thisLayout.createParallelGroup()
				                            .addComponent(jCheckBox1, GroupLayout.Alignment.LEADING, 0, 120, Short.MAX_VALUE)
				                            .addGroup(GroupLayout.Alignment.LEADING, thisLayout.createSequentialGroup()
				                                .addComponent(epsilonField, GroupLayout.PREFERRED_SIZE, 82, GroupLayout.PREFERRED_SIZE)
				                                .addGap(0, 38, Short.MAX_VALUE))
				                            .addGroup(GroupLayout.Alignment.LEADING, thisLayout.createSequentialGroup()
				                                .addComponent(EpsilonLabel, GroupLayout.PREFERRED_SIZE, 82, GroupLayout.PREFERRED_SIZE)
				                                .addGap(0, 38, Short.MAX_VALUE)))
				                        .addGap(20)
				                        .addGroup(thisLayout.createParallelGroup()
				                            .addComponent(nextPlayersField, GroupLayout.Alignment.LEADING, GroupLayout.PREFERRED_SIZE, 83, GroupLayout.PREFERRED_SIZE)
				                            .addComponent(competenceField, GroupLayout.Alignment.LEADING, GroupLayout.PREFERRED_SIZE, 82, GroupLayout.PREFERRED_SIZE)
				                            .addComponent(jLabel6, GroupLayout.Alignment.LEADING, GroupLayout.PREFERRED_SIZE, 82, GroupLayout.PREFERRED_SIZE)))
				                    .addGroup(thisLayout.createSequentialGroup()
				                        .addGap(13)
				                        .addGroup(thisLayout.createParallelGroup()
				                            .addGroup(GroupLayout.Alignment.LEADING, thisLayout.createSequentialGroup()
				                                .addComponent(StrategyLabel, GroupLayout.PREFERRED_SIZE, 93, GroupLayout.PREFERRED_SIZE)
				                                .addGap(0, 89, Short.MAX_VALUE))
				                            .addGroup(GroupLayout.Alignment.LEADING, thisLayout.createSequentialGroup()
				                                .addComponent(DistributionLabel, GroupLayout.PREFERRED_SIZE, 93, GroupLayout.PREFERRED_SIZE)
				                                .addGap(0, 89, Short.MAX_VALUE))
				                            .addGroup(GroupLayout.Alignment.LEADING, thisLayout.createSequentialGroup()
				                                .addGap(19)
				                                .addComponent(PlayerLabel, GroupLayout.PREFERRED_SIZE, 163, GroupLayout.PREFERRED_SIZE)
				                                .addGap(0, 0, Short.MAX_VALUE)))
				                        .addGap(28)))
				                .addGap(19)))))
				.addContainerGap(51, 51));

			//arrangement of the components in the panel 
		} catch (Exception e) {
			log.debug(e.toString());
		}
		
		//add listeners to components
		setListeners(props);
		
		//set the component options
		SetComponentsOptions();
		
		//case the properties are real one - attached to some player
		if(isAttachedToPlayer())
		{
			//set the label
			setPlayerLabel(props);
			//set all the rest 
			setPlayerPropFromExpirimentProperties(props);	
		}
	}
	//------------	end show	-----------------------
	
	
	/*** @param playerNumber */
	public void setPlayerLabel(ExperimentProperties props)
	{
		PlayerLabel.setText("Control Player " + playerNumber);
		
		//case not initialized the label will be in red
		if(!props.isPlayerInitialized(gameNumber, playerNumber, group))
		{
			labelToRed();
		}
	}

	
	/*** The label letters became in color red	 */
	private void labelToRed()
	{
		PlayerLabel.setForeground(Color.RED);
	}
	
	/*** The label letters became in color black	*/
	private void labelToBlack()
	{
		PlayerLabel.setForeground(Color.BLACK);
	}
	
	/**
	 * Set the listeners of the components
	 */
	//private void setListeners(final ExperimentProperties props)
	private void setListeners(final ExperimentProperties props)
	{
		//set the buttons
		ActionListener actionListener = createActionListener(props);
		// Save button take all the data
		SaveButton.addActionListener(actionListener);
		additionalSettingsbutton.addActionListener(actionListener);
		
		jCheckBox1.addItemListener(new ItemListener() {
			
			public void itemStateChanged(ItemEvent event) {
				if(event.getSource() == jCheckBox1)
				{
					
					//case check box was checked
					if(jCheckBox1.isSelected())
						nextPlayersField.setEnabled(true);
					// case check box was unchecked 
					else{nextPlayersField.setEnabled(false);}
				}
			}
		});
		
		DistributionComboBox.addActionListener(new ActionListener() {
			
			public void actionPerformed(ActionEvent event) {
				//case it attached and distribution combo
				if((isAttachedToPlayer())&&(event.getSource() == DistributionComboBox))
				{
					//get the distribution from the combo box
					String distribution = (String) DistributionComboBox.getSelectedItem();
					//create the command for the distribution frame
					DistributionFrameCommand command = new DistributionFrameCommand();
					command.setDistribution(distribution);
					command.setGroup(Agent_Group.CONTROL_AGENT);
					command.setGameNumber(gameNumber);
					command.setPlayerNumber(playerNumber);
					command.execute();
				}			
			}
			
		});
		
		// set the strategy combo
		StrategyComboBox.addActionListener(new ActionListener() {
			
			public void actionPerformed(ActionEvent event) {
				//case it attached and strategy combo
				if((isAttachedToPlayer())&&(event.getSource() == StrategyComboBox))
				{
					//get the strategy from the combo box
					String strategy = (String) StrategyComboBox.getSelectedItem();
					//set the additional settings button
					setEnableOrdesableAdditionalSettings(strategy,props);
					//create the command for the distribution frame
					StrategyFrameCommand command = new StrategyFrameCommand();
					command.setStrategy(strategy);
					command.setGameNumber(gameNumber);
					command.setPlayerNumber(playerNumber);
					//set number of turns
					command.setTurnsInGame(props.getNumOfTurns(gameNumber));
					command.execute();
				}	
			}
		});
	}
	//end of function setListeners
	
	
	
	private ActionListener createActionListener(final ExperimentProperties props)
	{
		ActionListener actionListener = new ActionListener() {
			
			public void actionPerformed(ActionEvent event) {
				//case Save Button clicked
				if(event.getSource() == SaveButton)
				{
					saveButtonFunc(props);
				}
				//case additional settings was clicked
				else if(event.getSource() == additionalSettingsbutton)
				{
					additionalSettingsButtonFunc(props);
				}
			}
		};
		
		return actionListener;
	}
	
	private void saveButtonFunc(ExperimentProperties props)
	{
		// create and execute the save command
		SavePlayerCommand saveCommand = new SavePlayerCommand(); 
		
		//check that the game and the player exist
		if((gameNumber == 0) || (!props.havePlayers(gameNumber, group)))
		{
			return;
		}
		if(!AuxiliaryClass.isDouble(epsilonField.getText()))
			return;
		double eps = Double.parseDouble( epsilonField.getText());
		
		if(!AuxiliaryClass.isDouble(competenceField.getText()))
			return;
		double competence = Double.parseDouble( competenceField.getText());
		
		//case invalid values epsilon and competence	
		if((eps > 1)||(eps < 0)||(competence > 1)||(competence < 0))
		{
			ErrorFrame frame = new ErrorFrame();
			frame.add(new ErrorPanel(frame, "Invalid value for Epsilon or Competence"));
			return;
		}
		
		try{
			//--------------	set the data ----------------
			saveCommand.setProps(props);
			
			saveCommand.setGameNumber(gameNumber);
			saveCommand.setPlayerNumber(playerNumber);
			// distribution that was selected in the combo
			saveCommand.setDistribution(distRepresentation);
			saveCommand.setStrategy(strategyRepresentation);
			
			saveCommand.setTeammateModel((String)TeammateModelComboBox.getSelectedItem());
			saveCommand.setAnalyzer((String) AnalyzerComboBox.getSelectedItem());
			
			saveCommand.setEpsilonStr(epsilonField.getText());
			saveCommand.setCompetenceStr(competenceField.getText());
			saveCommand.setAdditionalSettings(additionalSettings);
			saveCommand.setGroup(group);
			//take the next players if the check box is selected
			if(jCheckBox1.isSelected())
			{
				saveCommand.setNextPlayersStr(nextPlayersField.getText());
				saveCommand.setMorePlayersUpdate(true);
			}
			//--------------	execute ----------------
			saveCommand.execute();
			
			//set the label color
			labelToBlack();
		
		}
		catch (Exception e){
			
		}
	}
	
	
	private void createAdditionalSettings()
	{
		additionalSettings =  new AdditionalSettings();
	}
	
	private void additionalSettingsButtonFunc(ExperimentProperties props)
	{
		AdditionalSettingsFrame frame = new AdditionalSettingsFrame();
		AdditionalSettingsPanel panel = new AdditionalSettingsPanel(frame, this, additionalSettings);
		frame.add(panel);
	}
	
	private void setEnableOrdesableAdditionalSettings(String name, ExperimentProperties props)
	{
		//case manual adaptive
		if(name.equals(ConfigurationParameters.Strategy.MANUAL_ADAPTIVE))
		{
			additionalSettingsbutton.setEnabled(true);
			//case the player initialized, check with what strategy
			if(props.isPlayerInitialized(gameNumber, playerNumber, group))
			{
				AgentRepresentation agentRepresentation =  props.getPlayer(gameNumber, playerNumber,group);
				if (agentRepresentation.getAdditionalSettings() == null)
				{
					createAdditionalSettings();
				}
			}
			//case the player not initialized, create new AdditionalSettings 
			else 
			{
				createAdditionalSettings();
			}
		}
		//other strategies false
		else{
			additionalSettingsbutton.setEnabled(false);
			//set AdditionalSettings to null
			additionalSettings = null;
		}
		
	}
	
	
	/**
	 * 
	 */
	private void SetComponentsOptions()
	{
		//case there is distributionList
		if(distributionList != null)
		{
			for(int i = 0; i < distributionList.size(); ++i){
				DistributionComboBox.addItem(distributionList.get(i));
			}	
		}
		
		//case there is strategyList
		if(strategyList != null)
		{	//add strategies to comboBox
			for(int i = 0; i < strategyList.size(); ++i){
				StrategyComboBox.addItem(strategyList.get(i));
			}
		}
		
		//case there is teammateModelList
		if(teammateModelList != null)
		{	//add team mate models to comboBox
			for(int i = 0; i < teammateModelList.size(); ++i){
				TeammateModelComboBox.addItem(teammateModelList.get(i));
			}
		}
		
		//case there is analyzerlList
		if(analyzerlList != null)
		{	//add analyzers to comboBox
			for(int i = 0; i < analyzerlList.size(); ++i){
				AnalyzerComboBox.addItem(analyzerlList.get(i));
			}
		}
	}

	/**
	 * @return true/false
	 */
	private boolean isAttachedToPlayer()
	{
		return (playerNumber > 0);
	}
	
	private void setPlayerPropFromExpirimentProperties(ExperimentProperties props)
	{
		//case the player is initialized
		if(props.isPlayerInitialized(gameNumber, playerNumber, group))
		{
			//set
			setPlayerProperties(props);
		}
	}
	
	
	/*** @param props */
	private void setPlayerProperties(ExperimentProperties props)
	{
		AgentRepresentation agentRepresentation = props.getPlayer(gameNumber, playerNumber, group);
		
		//set the additional settings
		this.additionalSettings = agentRepresentation.getAdditionalSettings();
		
		//set the combos from player properties
		StrategyComboBox.setSelectedItem(agentRepresentation.getStrategyType().getStrategyName());
		TeammateModelComboBox.setSelectedItem(agentRepresentation.getTeammateModelType());
		AnalyzerComboBox.setSelectedItem(agentRepresentation.getAnalyzerType());
		DistributionComboBox.setSelectedItem(agentRepresentation.getDistributionType().getDistributionName());
		
		//set the text field
		epsilonField.setText(Double.toString(agentRepresentation.getEpsilon()));
		competenceField.setText(Double.toString(agentRepresentation.getCompetence()));	
	}
	
	/** @param distRepresentation */
	public void setDistRepresentation(DistributionRepresentation distRepresentation) {
		this.distRepresentation = distRepresentation;
	}
	
	public void setStrategyRepresentation(StrategyRepresentation strategyRepresentation) {
		this.strategyRepresentation = strategyRepresentation;
	}
	

	public void setAdditionalSettings(AdditionalSettings additionalSettings) {
		this.additionalSettings = additionalSettings;
	}
	
	public AdditionalSettings getAdditionalSettings() {
		return additionalSettings;
	}

	public static void setDistributionList(ArrayList<String> distributionList) {
		PlayerPropertiesPanel_2.distributionList = distributionList;
	}

	public static void setStrategyList(ArrayList<String> strategyList) {
		PlayerPropertiesPanel_2.strategyList = strategyList;
	}

	public static void setTeammateModelList(ArrayList<String> teammateModelList) {
		PlayerPropertiesPanel_2.teammateModelList = teammateModelList;
	}

	public static void setAnalyzerlList(ArrayList<String> analyzerlList) {
		PlayerPropertiesPanel_2.analyzerlList = analyzerlList;
	}
}
